package java2_28;

import java.util.Scanner;

//王菲的期末考试科目有语文，数学，英语，输入三门课成绩，计算平均分和总分。
public class homeWork_7 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入语文成绩：");
        double language = scanner.nextDouble();
        System.out.println("请输入数学的成绩：");
        double math = scanner.nextDouble();
        System.out.println("请输入英语的成绩：");
        double English = scanner.nextDouble();

        double add = language+math+English;
        double avg = (language+math+English)/3;
        System.out.println("王菲期末考试科目总分为："+add);
        System.out.println("王菲期末考试科目平均分为："+avg);
    }
}
